<?php
/* 
* [***********************]
* @author: mazhenyu[houdunwangmzy@163.com]
* @Date:   2014-06-17 17:16:28
* @Last Modified time: 2014-06-18 16:43:26
*/
class TagControl extends CommonControl{
	private $model;
	public function __auto(){
		$this->model = K('Tag');
	}
	public function index(){
		if(IS_POST){
			$this->model->save_data();
			$this->success('保存成功',U('index'));
		}
		$this->assign('data',$this->model->get_all());
		$this->display();
	}

	/**
	 * [add 添加标签]
	 */
	public function add(){
		if(IS_POST){
			$this->model->add_data();
			$this->success('添加成功',U('index'));
		}
		$this->display();

	}
}
?>
